package com.util;

import com.arcsoft.ASVLOFFSCREEN;
import com.arcsoft.demo.AFRTest;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;

/**
 * 统一返回ASCLOFFSCREEN
 */
public class ImageUtils {

    public static ASVLOFFSCREEN loadImage(String filePath) {
        return AFRTest.loadImage(filePath);
    }

    public static ASVLOFFSCREEN loadImage(BufferedImage img) {
        return AFRTest.loadImage(img);
    }

    public static ASVLOFFSCREEN loadImage(InputStream inputStream) throws IOException {
        BufferedImage image = ImageIO.read(inputStream);
        return loadImage(image);
    }
}
